package cn.ztr.ymcc.feign;

import cn.ztr.ymcc.domain.Login;
import cn.ztr.ymcc.domain.Role;
import cn.ztr.ymcc.feign.impl.UaaFeignImpl;
import cn.ztr.ymcc.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-uaa",fallbackFactory = UaaFeignImpl.class)
public interface UaaFeign {
    /**
     * 添加或修改角色信息
     * @param role
     * @return
     */
    @PostMapping("/role/save")
    JsonResult saveOrUpdate(@RequestBody Role role);

    /**
     * 添加或修改登录信息
     * @param login
     * @return
     */
    @PostMapping("/login/save")
    JsonResult saveOrUpdate(@RequestBody Login login);
}
